/* Copyright (c) Microsoft Corporation. All rights reserved. */



DEBUGGING

To debug Configure.aspx:

  1. Build and deploy SharePointLearningKit.wsp (see ..\Solution\ReadMe.txt).  This gets all the
     files in the correct locations, and SharePoint in the right state.  Make sure Configure.aspx
	 is working (at least enough to begin debugging).

  2. Open ..\SlkDll\SlkDll.sln in Visual Studio, so you can debug the ConfigurePage class (where
     the code for Configure.aspx lives).

  3. Optionally, open Configure.aspx in Notepad or Visual Studio as well (you can ignore most
     warnings on the page):

	 C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\ADMIN\SharePointLearningKit\Configure.aspx

  4. In Visual Studio (SlkDll), click Debug, Attach to Process.  Make sure "Show processes from all
     users" is selected, then select all "w3wp.exe" processes and click Attach.  (If you don't see
	 any w3wp.exe processes, navigate to any page in SharePoint Central Administration first --
	 that should create the process.)

  5. You should now be able to set a breakpoint in the ConfigurePage class.  When you navigate to
     Configure.aspx, the breakpoint should hit (if it's on the correct line).

  6. When you're done debugging, click Debug, Detach All.

When a new control is added to Configure.aspx, or a control ID is changed, you need to do these
steps:

  1. Copy the updated Configure.aspx to ...\12\TEMPLATE\ADMIN\SharePointLearningKit.  Or, edit
     Configure.aspx directly in ...\12\TEMPLATE\ADMIN\SharePointLearningKit -- but don't forget to
	 copy it back to this directory!

  2. Add a protected field to the ConfigurePage class (in ..\SlkDll) named the same as the ID of
     the control, and with the same type as the control.  (If you're not sure of the type, you can
	 set a breakpoint in Page_Load and examine it.)  Configure.aspx controls are bound to
	 ConfigurePage fields as follows:  When Configure.aspx compiles, it generates a subclass of
	 ConfigurePage, and looks for fields matching the controls.  If found, then when the subclass
	 is instantiated the fields are initialized to the control objects.  That's why the following
	 steps are required.

  3. Build the SlkDll project.  A post-build event causes Microsoft.SharePointLearningKit.dll to
     be copied into the global assembly cache.

  4. Run iisreset.exe.  This causes Microsoft.SharePointLearningKit.dll to be reloaded.

  5. Force Configure.aspx to change; for example, do Ctrl+S (save).  This will force a recompile,
     which is needed so that the derived class generated by Configure.aspx will recompile against
	 the updated base class.  Note that iisreset is not enough to force a recompile.
 

WHEN YOU ADD A FILE...

If you add a file (e.g. .aspx or .gif) to this directory and it needs to be included on the
customer's front-end server machines, don't forget to update ..\Solution\manifest.xml and
..\Solution\Cab.ddf.

